www.gusucode.com > 婚庆仪礼策划公司网站系统源代码 梦紫色 > 婚庆仪礼策划公司网站系统源代码 梦紫色/ly-write.asp

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0032)http://www.gzxuyuan.cn/index.asp -->
<!--#include file="conn.asp" -->
<!--#include file="web.asp" -->
<HTML 
xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>发表留言-武汉婚庆|武汉婚庆公司|武汉租车|武汉婚礼-【武汉星梦奇缘婚庆礼仪公司】</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK 
href="images/style.css" type=text/css rel=stylesheet>
<META content="发表留言-武汉婚庆,武汉租车,武汉租车公司,武汉婚庆公司,武汉婚礼,武汉婚礼公司,武汉星梦奇缘婚庆礼仪公司" name=keywords>
<META content="发表留言-武汉市星梦奇缘婚庆公司专业提供武汉婚庆礼仪,武汉租车服务,武汉婚礼策划等各类武汉婚庆服务,Tel:027-88080150,13317187232、QQ:411580000。选择星梦,选择完美,武汉婚礼,尽在星梦!" name=description>
<META content=l4HQADZc5en9twOT/ZtzIuAQKn4c0unyBPzrHqRvKV0= name=verify-v1>
<META content="MSHTML 6.00.2900.5803" name=GENERATOR></HEAD>
<BODY onselectstart="return false;" oncontextmenu="return false;" >
<DIV class=top><!--#include file="top.asp"--></DIV>




<TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#f1f1ea border=0>
  <TBODY> <TR><td align="center">
<TABLE cellSpacing=0 cellPadding=0 width="1002"  border=0>
  <TBODY> <TR>
 
    <TD width="360" align=middle valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="360" height="460">
      <param name="movie" value="flash/left.swf">
      <param name="quality" value="high">
	  <param name="wmode" value="transparent" />
      <embed src="flash/left.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="360" height="460"></embed>
     </object></TD><TD align=left valign="top" style="padding-left:10px;background:url(images/bg.jpg);">
	
	
	
	
	
	
	
	
	
	<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
              <TBODY>
              <TR>
                <TD>
                  <DIV 
                  style="MARGIN-TOP: 20px; MARGIN-BOTTOM: 10px; BORDER-BOTTOM: #161616 1px solid"><IMG 
                  src="images/fkly.jpg" width="300" height="45" title="发表留言">                </DIV></TD></TR>
              <TR>
                <TD class="h22 content" align="left" style="padding-left:5px;">
				
				
				
				
				
				
				
				
				
				
				
				
				


				

							
					<!--、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、 -->	
					<%
function chkhtm(stra)
  stra=replace(stra,"<","&lt;")
  stra=replace(stra,">","&gt;")
  stra=replace(stra,"'","")
  stra=replace(stra,"(","(")
  stra=replace(stra,")",")")
  stra=replace(stra,";",";")
  stra=replace(stra,",",",")
  stra=replace(stra,"%","%")
  stra=replace(stra,"+","+")
  chkhtm=stra
end function
%>	
				<div align="center">
	<table border="0" cellpadding="5" cellspacing="0" width="90%" id="table2" >
		<tr>
			<td>
			<p align="center">
			<a href="ly-write.asp">
			<img border="0" src="images/lywrite.gif" width="89" height="37"></a>&nbsp;
			<a href="fkly.asp">
			<img border="0" src="images/lyread.gif" width="89" height="37"></a></td>
		</tr>
	</table>
</div>
<%
username=chkhtm(trim(Request("username")))
email=chkhtm(trim(Request("email")))
sex=chkhtm(trim(Request("sex")))
lb=chkhtm(trim(request("lb")))
title=chkhtm(trim(Request("title")))
content=chkhtm(trim(Request("content")))
bm=chkhtm(trim(request("bm")))
lyyzmm=chkhtm(trim(request("lyyzmm")))
lyyzm=chkhtm(trim(request("lyyzm")))

if lyyzmm<>"" and lyyzm<>"" then
	if int(lyyzmm)<>int(lyyzm) then
		Response.Write "<script>alert('验证码输入不正确');</script>"
		Response.Write "<META http-equiv='refresh' content='0;url=ly-write.asp'>"
		Response.end
	end if
end if

if username=""  or sex="" or title="" or content="" or lb="" then
%>
<div align="center">
	<table border="1" cellpadding="10" width="90%" id="table3" style="border-collapse: collapse" bordercolor="#C0C0C0" bgcolor="#FFFFFF">
		
<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="VBScript" Type="text/vbscript"><!--
function FrontPage_Form1_onsubmit()
  Set theForm = document.FrontPage_Form1

  If (theForm.username.value = "") Then
    MsgBox "请在 你的姓名 域中输入值。", 0, "有效性验证错误"
    theForm.username.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.username.value) < 2) Then
    MsgBox "在 你的姓名 域中,请至少输入 2 个字符。", 0, "有效性验证错误"
    theForm.username.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.username.value) > 10) Then
    MsgBox "在 你的姓名 域中,请最多输入 10 个字符。", 0, "有效性验证错误"
    theForm.username.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If





  If (theForm.sex.selectedIndex < 0) Then
    MsgBox "请选择“性别”选项中的一项。", 0, "有效性验证错误"
    theForm.sex.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (theForm.sex.selectedIndex = 0) Then
    MsgBox "第一个“性别”选项无效。 请选择其他选项中的一项。", 0, "有效性验证错误"
    theForm.sex.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (theForm.lb.selectedIndex < 0) Then
    MsgBox "请选择“留言类型”选项中的一项。", 0, "有效性验证错误"
    theForm.lb.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (theForm.lb.selectedIndex = 0) Then
    MsgBox "第一个“留言类型”选项无效。 请选择其他选项中的一项。", 0, "有效性验证错误"
    theForm.lb.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (theForm.lyyzm.value = "") Then
    MsgBox "请在 验证码 域中输入值。", 0, "有效性验证错误"
    theForm.lyyzm.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.lyyzm.value) < 5) Then
    MsgBox "在 验证码 域中,请至少输入 5 个字符。", 0, "有效性验证错误"
    theForm.lyyzm.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.lyyzm.value) > 5) Then
    MsgBox "在 验证码 域中,请最多输入 5 个字符。", 0, "有效性验证错误"
    theForm.lyyzm.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  checkOK = "0123456789-" 
  checkStr = theForm.lyyzm.value
  allValid = True
  validGroups = True
  decPoints = 0
  allNum = ""
  For i = 1 to len(checkStr)
    ch = Mid(checkStr, i, 1)
    If (InStr(checkOK, ch) = 0) Then
        allValid = False
        Exit For
    End If
    allNum = allNum & ch
  Next
  If (Not allValid) Then
    MsgBox "在 验证码 域中,只能输入 数字 字符。", 0, "有效性验证错误"
    theForm.lyyzm.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If ((checkstr <> "" And Not IsNumeric(allNum)) Or (decPoints > 1) Or Not validGroups) Then
    MsgBox "请在 lyyzm 域中输入一个有效数字。", 0, "有效性验证错误"
    theForm.lyyzm.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (theForm.title.value = "") Then
    MsgBox "请在 留言标题 域中输入值。", 0, "有效性验证错误"
    theForm.title.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.title.value) < 2) Then
    MsgBox "在 留言标题 域中,请至少输入 2 个字符。", 0, "有效性验证错误"
    theForm.title.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.title.value) > 50) Then
    MsgBox "在 留言标题 域中,请最多输入 50 个字符。", 0, "有效性验证错误"
    theForm.title.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (theForm.content.value = "") Then
    MsgBox "请在 留言内容 域中输入值。", 0, "有效性验证错误"
    theForm.content.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.content.value) < 1) Then
    MsgBox "在 留言内容 域中,请至少输入 1 个字符。", 0, "有效性验证错误"
    theForm.content.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If
  FrontPage_Form1_onsubmit = True 
End Function
--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="ly-write.asp" name="FrontPage_Form1">
		<tr>
			<td width="722" align="center">
			
				<div align="center">
					<table border="1" cellpadding="5" width="95%" id="table5" style="border-collapse: collapse" bordercolor="#C0C0C0">
						
						
						
						<tr>
							<td width="128" align="center">留言标题</td>
							<td align="left">
							&nbsp;<!--webbot bot="Validation" s-display-name="留言标题" b-value-required="TRUE" i-minimum-length="2" i-maximum-length="50" -->
							<input type="text" name="title" size="40" maxlength="50"> <font color="#FF0000">*</font></td>
						</tr>
						<tr>
							<td width="128" align="center">你的姓名</td>
							<td width="400" align="left">
							&nbsp;<!--webbot bot="Validation" s-display-name="你的姓名" b-value-required="TRUE" i-minimum-length="2" i-maximum-length="10" -->
							<input name="username" type="text" value="游客" size="40" maxlength="10"></td>
						</tr>
						<tr>
							<td width="128" align="center">性  别</td>
							<td align="left">&nbsp;<!--webbot bot="Validation" s-display-name="性别" b-value-required="TRUE" b-disallow-first-item="TRUE" -->
							  <select size="1" name="sex">
							<option>请选择...</option>
							<option  selected="selected">男</option>
							<option>女</option>
							</select></td>
						</tr>
						<tr>
							<td width="128" align="center">联系方式</td>
							<td align="left">
							&nbsp;<!--webbot bot="Validation" s-display-name="电子邮件" b-value-required="TRUE" i-minimum-length="5" i-maximum-length="50" -->
							<input type="text" name="Email" size="40" maxlength="50"></td>
						</tr>
						<tr>
							<td width="128" align="center">留言内容</td>
							<td align="left">
							&nbsp;<!--webbot bot="Validation" s-display-name="留言内容" b-value-required="TRUE" i-minimum-length="1" -->
							<textarea rows="5" name="content" cols="40"></textarea>
                            <font color="#FF0000">*</font></td>
						</tr>
						
						
						
						<tr style="display:none;">
							<td width="128" align="center">留言类型</td>
							<td align="left">
							&nbsp;<!--webbot bot="Validation" s-display-name="留言类型" b-value-required="TRUE" b-disallow-first-item="TRUE" -->
							<select size="1" name="lb">
                              <option>请选择...</option>
                              <%
							set rs = Server.CreateObject("ADODB.RecordSet")
							rs.Open "select * from [lylb] order by id asc",conn,1,1
							while not rs.eof
							%>
                              <option value='<%=rs("id")%>' selected="selected"><%=rs("lb")%></option>
                              <%
							rs.movenext
							wend
							rs.close:set rs=nothing
							%>
                            </select></td>
						</tr>
						<tr>
							<td width="128" align="center">验证码
							<%
							Randomize
							an=""
							an= int((99999-22222+1) * RND +22222)
							%>
							<textarea style='display:none' cols=1 name='lyyzmm'><%=an%></textarea>							</td>
							<td align="left">
							&nbsp;<!--webbot bot="Validation" s-display-name="验证码" s-data-type="Integer" s-number-separators="x" b-value-required="TRUE" i-minimum-length="5" i-maximum-length="5" -->
							<input type="text" name="lyyzm" size="15" maxlength="5">
							<%
							Response.Write an
							%></td>
						</tr>
						
						<tr style="display:none">
							<td width="128" align="center">是否保密</td>
							<td align="left">&nbsp;
							  <input type="radio" value="1" name="bm">保密 <input type="radio" value="0" checked  name="bm">不保密  <font color="#999999">(仅工作人员可以查看)</font></td>
						</tr>
					</table>
				</div>
			
				<p align="center">
				<input type=hidden name=sh value=<%=lysh%>>
				<input type="submit" value="提交" name="B1">   <input type="reset" value="重置" name="B2"></p>
			
			</td>
		</tr></form>

	</table>
</div>

<%
else

sh=trim(request("sh"))

userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR")

Randomize
an= int((10-1+1) * RND +1)

if sex="男" then
   tx="images/lylan-"&an&".gif"
else
   tx="images/lynv-"&an&".gif"
end if

addtime=date()

content=replace(content,chr(13),"<BR>")

conn.Execute "insert into [ly] ([adduser],[email],[sex],[tx],[title],[content],[ip],[addtime],[bm],[lb],[sh]) values('"&username&"','"&email&"','"&sex&"','"&tx&"','"&title&"','"&content&"','"&userip&"','"&addtime&"','"&bm&"','"&lb&"',1)"

conn.close:set conn=nothing


if sh="" then
else
	er=1
end if
Response.Redirect "fkly.asp?er="&sh

end if
%>
<div align="center">
	<table border="1" cellpadding="5" width="90%" id="table4" bgcolor="#FFFFFF" style="border-collapse: collapse" bordercolor="#C0C0C0">
		<tr>
			<td>
</td>
		</tr>
	</table>
</div>
<div align="center">
	<table border="0" cellpadding="0" cellspacing="0" width="90%" height="37" id="table5">
		<tr>
			<td background="images/lydown.gif"> </td>
		</tr>
	</table>
</div>
<%
'rs.close:set rs=nothing
conn.close:set conn=nothing
%>
														
														<!--	  。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 -->
				
				
				
				
				
				
				
				
				</TD>
              </TR></TBODY></TABLE>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	</TD>
</TR>
  </TBODY></TABLE></td></TR></TBODY></TABLE>
  
  
  
  
<!--include file="flash.asp"-->
<DIV class=foot>
<!--#include file="bottom.asp"-->
</DIV></BODY></HTML>